package cn.liyao.web.model;

import lombok.Builder;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Table(name = "t_friend_record")
@Data
@Entity
public class FriendRecord {


    @Id
    @Column(columnDefinition = "VARCHAR(64)")
    private String id;

    @Column(columnDefinition = "VARCHAR(64)")
    private String senderId;

    @Column(columnDefinition = "VARCHAR(64)")
    private String receiveId;


    private String reason;


    // 0 已发送  1 已接受 2 已拒绝 3.已忽略
    // sender == self  ? //  原样显示
    // sender != self // state == 0 ? [接受, 拒绝,忽略]  else state = x [已接受,已拒绝,已忽略]
    private Integer state;


    private Date createAt;


    @Transient
    private User user;

}
